 |
|
 |
Subject: Subscript out of range error |
 |
 |
 |
Product Area: Notes Client |
 |
Technical Area: Error Message |
 |
Platform: Windows |
 |
Release: 8.5.2 |
 |
Reproducible: -Reproducibility- |
 |
 |
 |
 |
Hello,
I am trying to resolve an issue on a Db that I inherited. When a user selects an Edit button to update an existing document in the application, they get the Subscript out of Range error. I used the debugger to walk through the code and pinpointed the line of code generating the error, but need some help in resolving it. The lotuscript is as follows:
Dim workspace as New NotesUIworkspace
Dim doc as NotesDocument
Dim uidoc as NotesUIDocument
Dim index as Integer
Din choice as Integer
Set uidoc=workspace.CurrentDocument
Set doc=uidoc.Document
If Not(workspace.CurrentDocument.EditMode)Then
workspace.CurrentDocument.EditMode=True
If uidoc.FieldGetText("IndentAssets_Cont") <>"" Then
If True=workspace.DialogBox("ItemSelectionB1", True, True, False, False, False, False, "Please Select Line Item to Edit") Then
If doc.ItemSelectionB1(0)="" Then
Exit Sub
doc.Action="Edit"
Temp$=Left$(doc.ItemSelectionB1(0), (Instr(1, doc.ItemSelectionB1(0), ".")))
choice=Cint(Temp$)-1
'Prefill dialog box
doc.EditNumB1=choice + 1
The below line causing the error:
**doc.B1Edit1=doc.IndentAssets_Cont(choice)**
doc.B1Edit2=doc.TransactionType_Cont(choice)
doc.B1Edit3=doc.TransactionDate_Cont(choice)
doc.B1Edit4=TransactionAmount_Cont(choice)
If workspace.DialogBox("Schedule B1 Dialogbox", True, True, False, False, False, False, "Schedule B") Then
'Set the array size
index=Ubound(doc.NumB1)
Call eSummaryFields(doc, index, choice)
Call uidoc.Refresh
End If
Else
Exit Sub
End If
Else
Messagebox "Cannot execute the specified command since there are no items to edit.", 0 + 16, "Schedule B Continued"
End If
'Clear the dialogbox fields
doc.Action=""
doc.EditNumB1=""
doc.B1Edit1=""
doc.B1Edit2=""
doc.B1Edit3=""
doc.B1Edit4=""
End Sub
Any help you can provide will be greatly appreciated. Thanks.
 
Feedback number WEBB9H4JT2 created by ~Naomi Fezreburoni on 03/11/2014

Status: Open
Comments:

Subscript out of range error (~Naomi Fezrebur... 11.Mar.14)
. . So... (~Fritz Ekfoober... 11.Mar.14)
. . . . Forgot about integers... (~Martha Lopjipy... 11.Mar.14)
. . Backtrack in your code (~Martha Lopjipy... 11.Mar.14)
. . . . One thing I don't understand (~Naomi Fezrebur... 11.Mar.14)
. . . . . . at what line is the error occuring?... (~Phil Nonhipige... 11.Mar.14)
. . . . . . Not sure what you mean (~Martha Lopjipy... 11.Mar.14)
. . choice is not zero? (~Judy Ektumizen... 12.Mar.14)
. . . . Resolution (~Naomi Fezrebur... 12.Mar.14) |
|  |
|